<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<script type="text/javascript" src="<%=path%>/static/js/jquery-3.2.1.js"></script>
<!DOCTYPE html>
<header>
<div id="topnav">
    <div class="topnav">
      <ul>
        <li><a href="<%=path %>/index.html" title="">首页</a></li>
        <li><a href="<%=path %>/web/aboutUs" title="">关于我们</a></li>
        <li><a href="<%=path %>/web/developer" title="">开发团队</a></li>
      </ul>
      <ol>
       	<li><a href="<%=path %>/web/article/list" >文论</a></li>
        <li><a href="<%=path %>/web/question/list" >问答</a></li>
        
        <c:if test="${sessionScope.userinfo!=null}" var="userinfo">
        <li class="photo"><a href="<%=path %>/web/userinfo/yanZheng?"><img alt="" src="<%=path%>/static/head_img/${sessionScope.userinfo.headName}"></a></li>
        <li><a href="<%=path %>/web/userinfo/yanZheng?" title="用户名">${sessionScope.userinfo.nickName} 欢迎你</a></li>
        
        <li><a id="exit" style="color: white;" href="javascript:void(0);">退出</a></li>
        </c:if>
         <c:if test="${not userinfo}">
          <li><a href="<%=path %>/web/userLogin/login.html" title="">登录</a></li>
        <!-- <li><a href="javascript:void(0);" title="用户名">请先登录 欢迎你</a></li> -->
        <li><a href="<%=path %>/web/userLogin/reg.html" title="">注册</a></li>
        </c:if>
        
      </ol>
    </div>
  </div>
</header>

<script type="text/javascript">
	$(function() {
		$("#exit").click(function() {
				location.href="<%=path %>/web/exit";
		})
	})

</script>
